<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/15 0015
 * Time: 23:51
 */
namespace app\api\controller;
use think\Controller;
use think\Request;
use think\File;
class Image extends Controller{
    public function upload(){
        $file=Request::instance()->file('file');
        $info=$file->move('upload');
        if($info&&$info->getPathname()){
            return show(1,'success','/'.$info->getPathname());
        }
        return show(0,'upload error');
    }
}